<?
function smarty_function_urlencode($params, &$smarty)
{
    return urlencode($params['val']);
}
?>